package com.ganbo.thread;

public class IsAliveDemo extends Thread {

    @Override
    public void run() {

    }

    public static void main(String[] args) {
        IsAliveDemo i = new IsAliveDemo();
        Thread t = new Thread(i);

        System.out.println(i.getName());
        System.out.println(t.getName());

//        i.start();
//        t.start();
    }

    //    public IsAliveDemo() {
//        System.out.println("CountOperate--begin");
//        System.out.println("Thread.currentthread().getName()=" + Thread.currentThread().getName());
//        System.out.println("Thread.currentthread().isAlive()=" + Thread.currentThread().isAlive());
//        System.out.println("==this.getname()=" + this.getName());
//        System.out.println("==this.isAlive()=" + this.isAlive());
//        System.out.println("CountOperate--end");
//    }
//
//    @Override
//    public void run() {
//        System.out.println("run--begin");
//        System.out.println("Thread.currentthread().getName()=" + Thread.currentThread().getName());
//        System.out.println("Thread.currentthread().isAlive()=" + Thread.currentThread().isAlive());
//        System.out.println("this.getname()=" + this.getName());
//        System.out.println("this.isAlive()=" + this.isAlive());
//        System.out.println("run--end");
//    }
//
//    public static void main(String[] args) {
//        System.out.println("===============================================================");
//
//        IsAliveDemo c = new IsAliveDemo();
//        System.out.println("main beain t1 is Alive == >" + c.isAlive());
//
//        System.out.println("t+++++++++++++++++++++++++>" + c.getName());
//        c.setName("A");
//        c.start();
//        System.out.println("main end t is Alive==>" + c.isAlive());
//
//    }
}
